<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>悠络客接口测试平台</title>
	<!--awesome font include-->
        <link type="text/css" rel="stylesheet" href="/static/assets/css/font-awesome.min.css" />
        <!--include plugin css-->
        <link type="text/css" rel="stylesheet" href="/static/src/jquery-rvnm.css" />

        <link rel="stylesheet" href="/static/bootstrap-3.4.1-dist/css/bootstrap.min.css">
    <link rel="shortcut icon" href="/static/faicon.ico">
</head>

<nav id="navbar" class="">
            <ul>

                <li>
                    <a href="/project_list/">
                        项目列表
                    </a>
                </li>
                <li>
                    <a href="#">
                        接口调试
                    </a>
                </li>
                <li>
                    <a href="/help/">
                        帮助
                    </a>
                </li>
                <li>
                    <a href="/admin/" target="_blank">
                        后台
                    </a>
                </li>

            </ul>

</nav>
<button id="menu_btn" onclick="display_menu()" style="position: absolute;
        left: 188px;top: 48%;z-index: 999;height: 35px;
        background-color: #353c48;color: white;border: 0;font-size: x-large"><</button>

{#菜单栏隐藏或者显示函数#}
<script>
    function display_menu(){
        menu = document.getElementById('navbar');
        btn = document.getElementById('menu_btn');
        if (btn.innerText == '<'){
            menu.style.display = 'none';
            btn.style.left = '0px';
            btn.innerText = '>';
        }else {
            menu.style.display = 'block';
            btn.style.left = '188px';
            btn.innerText = '<';
        }


    }
</script>
<div style="font-size: large;position: absolute;top: 0px;right: 0px;box-shadow: 4px 4px 8px grey;
            padding-left: 5px;padding-right: 5px">
    <a href="/home/" style="color: black;text-decoration: none"> 主页 </a>
    <a href="/logout/"  style="color: black;text-decoration: none"> 退出 </a>
</div>
<br>
<script src="/static/js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="/static/bootstrap-3.4.1-dist/js/bootstrap.min.js" type="text/javascript"></script>
        <!--include plugin js-->
        <script type="text/javascript" src="/static/src/jquery-rvnm.js"></script>
        <!--js run code-->
        <script type="text/javascript">
            $(function () {
                var rvnMenu = $("#navbar").rvnm({
//                    mode: 'mobile',
//                    responsive: false,
                    searchable: true,
                    theme: 'dark-lesb'
                });
                console.log(rvnMenu);
//                rvnMenu.setMode('minimal');
                rvnMenu.setTheme('dark-ruby');
            });
</script>

{#子页面嵌到主页面当中#}
<div id="page1"></div>
<script>
    $('#page1').load('/child/' + '{{ whichHTML }}/{{ oid }}/')
</script>

{#如果是主页不隐藏菜单栏，其他页面进入就自动点击隐藏#}
<script>
    if ("{{ whichHTML }}" !='home.html'){
        document.getElementById('menu_btn').click();
    }

</script>
</body>
</html>